<?php
/*
 * Copyright (c) 2017-2025 Tencent. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
namespace TencentCloud\Lkeap\V20240522\Models;
use TencentCloud\Common\AbstractModel;

/**
 * ReconstructDocumentSSE response structure.
 *
 * @method string getTaskId() Obtain Task ID. The unique identifier of the current request.
 * @method void setTaskId(string $TaskId) Set Task ID. The unique identifier of the current request.
 * @method string getResponseType() Obtain Response type. 1: return progress information; 2: return parsing result.
 * @method void setResponseType(string $ResponseType) Set Response type. 1: return progress information; 2: return parsing result.
 * @method string getProgress() Obtain Progress. Value range: 0 to 100.
 * @method void setProgress(string $Progress) Set Progress. Value range: 0 to 100.
 * @method string getProgressMessage() Obtain Progress information.
 * @method void setProgressMessage(string $ProgressMessage) Set Progress information.
 * @method string getDocumentRecognizeResultUrl() Obtain Temporary download URL for the document parsing result. The file is a zip compressed package, and the URL is valid for 30 minutes. The compressed package contains the following folders: \*.md, \*.jsonl, \*mllm.json, images.
 * @method void setDocumentRecognizeResultUrl(string $DocumentRecognizeResultUrl) Set Temporary download URL for the document parsing result. The file is a zip compressed package, and the URL is valid for 30 minutes. The compressed package contains the following folders: \*.md, \*.jsonl, \*mllm.json, images.
 * @method array getFailedPages() Obtain Page number where document parsing fails.
 * @method void setFailedPages(array $FailedPages) Set Page number where document parsing fails.
 * @method integer getFailPageNum() Obtain 
 * @method void setFailPageNum(integer $FailPageNum) Set 
 * @method integer getSuccessPageNum() Obtain 
 * @method void setSuccessPageNum(integer $SuccessPageNum) Set 
 * @method string getRequestId() Obtain The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. As a streaming response API, when the request is successfully completed, the RequestId will be placed in the Header "X-TC-RequestId" of the HTTP response.
 * @method void setRequestId(string $RequestId) Set The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. As a streaming response API, when the request is successfully completed, the RequestId will be placed in the Header "X-TC-RequestId" of the HTTP response.
 */
class ReconstructDocumentSSEResponse extends AbstractModel
{
    /**
     * @var string Task ID. The unique identifier of the current request.
     */
    public $TaskId;

    /**
     * @var string Response type. 1: return progress information; 2: return parsing result.
     */
    public $ResponseType;

    /**
     * @var string Progress. Value range: 0 to 100.
     */
    public $Progress;

    /**
     * @var string Progress information.
     */
    public $ProgressMessage;

    /**
     * @var string Temporary download URL for the document parsing result. The file is a zip compressed package, and the URL is valid for 30 minutes. The compressed package contains the following folders: \*.md, \*.jsonl, \*mllm.json, images.
     */
    public $DocumentRecognizeResultUrl;

    /**
     * @var array Page number where document parsing fails.
     */
    public $FailedPages;

    /**
     * @var integer 
     */
    public $FailPageNum;

    /**
     * @var integer 
     */
    public $SuccessPageNum;

    /**
     * @var string The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. As a streaming response API, when the request is successfully completed, the RequestId will be placed in the Header "X-TC-RequestId" of the HTTP response.
     */
    public $RequestId;

    /**
     * @param string $TaskId Task ID. The unique identifier of the current request.
     * @param string $ResponseType Response type. 1: return progress information; 2: return parsing result.
     * @param string $Progress Progress. Value range: 0 to 100.
     * @param string $ProgressMessage Progress information.
     * @param string $DocumentRecognizeResultUrl Temporary download URL for the document parsing result. The file is a zip compressed package, and the URL is valid for 30 minutes. The compressed package contains the following folders: \*.md, \*.jsonl, \*mllm.json, images.
     * @param array $FailedPages Page number where document parsing fails.
     * @param integer $FailPageNum 
     * @param integer $SuccessPageNum 
     * @param string $RequestId The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. As a streaming response API, when the request is successfully completed, the RequestId will be placed in the Header "X-TC-RequestId" of the HTTP response.
     */
    function __construct()
    {

    }

    /**
     * For internal only. DO NOT USE IT.
     */
    public function deserialize($param)
    {
        if ($param === null) {
            return;
        }
        if (array_key_exists("TaskId",$param) and $param["TaskId"] !== null) {
            $this->TaskId = $param["TaskId"];
        }

        if (array_key_exists("ResponseType",$param) and $param["ResponseType"] !== null) {
            $this->ResponseType = $param["ResponseType"];
        }

        if (array_key_exists("Progress",$param) and $param["Progress"] !== null) {
            $this->Progress = $param["Progress"];
        }

        if (array_key_exists("ProgressMessage",$param) and $param["ProgressMessage"] !== null) {
            $this->ProgressMessage = $param["ProgressMessage"];
        }

        if (array_key_exists("DocumentRecognizeResultUrl",$param) and $param["DocumentRecognizeResultUrl"] !== null) {
            $this->DocumentRecognizeResultUrl = $param["DocumentRecognizeResultUrl"];
        }

        if (array_key_exists("FailedPages",$param) and $param["FailedPages"] !== null) {
            $this->FailedPages = [];
            foreach ($param["FailedPages"] as $key => $value){
                $obj = new ReconstructDocumentFailedPage();
                $obj->deserialize($value);
                array_push($this->FailedPages, $obj);
            }
        }

        if (array_key_exists("FailPageNum",$param) and $param["FailPageNum"] !== null) {
            $this->FailPageNum = $param["FailPageNum"];
        }

        if (array_key_exists("SuccessPageNum",$param) and $param["SuccessPageNum"] !== null) {
            $this->SuccessPageNum = $param["SuccessPageNum"];
        }

        if (array_key_exists("RequestId",$param) and $param["RequestId"] !== null) {
            $this->RequestId = $param["RequestId"];
        }
    }
}
